﻿<%@ Page Language="C#" MasterPageFile="~/SupplierPanel/Supplier.Master" AutoEventWireup="true" CodeBehind="Dashboard.aspx.cs" Inherits="Fish_Atlantis.SupplierPanel.Dashboard" %>

<%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">

</asp:Content> 

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server" >
   
    <table style="width:100%;">
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
           
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="center">
                <asp:SqlDataSource ID="ListDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand=" select f.FisheryName,Month,Risk_Rank,Amount,username from Fishery f,Risk,Transaction_Record x,Users
 where f.FisheryID=x.FisheryID and Risk.FisheryID=x.FisheryID and x.SupplierID=Users.UserID and Month(x.Date)=Risk.Month;">
                </asp:SqlDataSource>
                <asp:ScriptManager ID="ScriptManager1" runat=server></asp:ScriptManager>
                <asp:SqlDataSource ID="FishAmountDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand=" select f.FisheryName from Transaction_Record t,Fishery f 
 where f.FisheryID=t.FisheryID and t.SupplierID=@userID
 group by f.FisheryName
 order by SUM(t.Amount);">
                    <SelectParameters>
                        <asp:SessionParameter DefaultValue="2" Name="userID" SessionField="UserID" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
   
    </asp:Content>

